import request from '@/utils/request'
import type { ResponseData } from '../type'

// 歌曲统计
export const songCountApi = () => request.get<any, ResponseData>('/song/songCount')

// 全部歌曲信息【可选参数】
export const songFindAllApi = (params?: any) => request.get<any, any>('/song', { params })

// 条件查询
export const songFindBySearchApi = (params: any) => request.get<any, any>('/song/search', { params })

// 新增or修改   0:正常添加，若有重复则报异常；1：强制添加
export const songSaveApi = (songData: any, cont: any) => request.post<any, any>('/song?cont=' + cont, songData)

// 删除
export const songDeleteApi = (id: any) => request.delete('/song/' + id)

// 检索歌词
export const songFindLyricApi = (id: any) => request.get<any, any>('/song/lyric/' + id)

// 批量删除
export const songDelBatchApi = (songs: any) => request.put<any, any>('./song/delBatch', songs)

// 导出报表
export const songExportApi = (ids: any) => request.get<any, any>('./song/export/' + ids)
